﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Demo.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="Content/bootstrap.css" rel="stylesheet" />
    <style>
        .title {
            height: 100px;
            display: flex;
            justify-content: center;
            align-content: center;
            font-weight: bold;
            font-size: 40px;
        }

        .info {
            width: 200px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="container" style="margin: 50px auto; width: 300px;">
            <div class="row">
                <legend class="title">修改信息</legend>
                <div class=" form-group">
                    <h5 class="text-left">欢迎<%= user.RankInfo.RName %><%= user.UserName %>,今天是<span id="time"></span></h5>
                </div>
                <div class="form-horizontal">
                    <div class="form-group">
                        <label>用户名:</label>
                        <asp:TextBox runat="server" ID="txtUserName" CssClass="form-control"></asp:TextBox>
                    </div>
                    <div class="form-group">
                        <label>密码:</label>
                        <asp:TextBox runat="server" ID="txtPwd" CssClass="form-control"></asp:TextBox>
                    </div>
                    <div class="form-group">
                        <label>地区:</label>
                        <asp:TextBox runat="server" ID="txtAddress" CssClass="form-control"></asp:TextBox>
                    </div>
                    <div class="form-group">
                        <label>真实姓名:</label>
                        <asp:TextBox runat="server" ID="txtTrueName" CssClass="form-control"></asp:TextBox>
                    </div>
                    <div class="form-group">
                        <label>权限：</label>
                        <asp:DropDownList ID="ddlRole" runat="server" OnSelectedIndexChanged="ddlRole_SelectedIndexChanged"></asp:DropDownList>
                    </div>
                    <div class="form-group text-center">
                        <asp:Button runat="server" ID="btnUpdate" CssClass="btn-lg  btn-dark " Text="修改" OnClick="btnUpdate_Click" />
                    </div>
                </div>
            </div>
        </div>
    </form>
    <script>
        window.onload = function () {
            var timeSpan = document.getElementById("time");
            setInterval(function () {
                var date = new Date();
                if (date.getSeconds() >= 10) {
                    timeSpan.innerHTML = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDay() + "  " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
                    if (date.getMinutes() >= 10) {
                        timeSpan.innerHTML = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDay() + "  " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
                    }
                    else {
                        timeSpan.innerHTML = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDay() + "  " + date.getHours() + ":0" + date.getMinutes() + ":" + date.getSeconds();
                    }
                }
                else {
                    timeSpan.innerHTML = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDay() + "  " + date.getHours() + ":" + date.getMinutes() + ":0" + date.getSeconds();
                    if (date.getMinutes() >= 10) {
                        timeSpan.innerHTML = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDay() + "  " + date.getHours() + ":0" + date.getMinutes() + ":" + date.getSeconds();
                    }
                    else {
                        timeSpan.innerHTML = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDay() + "  " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
                    }
                }

            }, 1000);
        }
    </script>
</body>
</html>
